User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
design_guide_transform [2018/03/21 02:30]
z3dev
design_guide_transform [2018/06/12 14:18]
z3dev
Line 6: Line 6:
  
 <code javascript>​ <code javascript>​
-var m = new CSG.Matrix4x4(); +let m = new CSG.Matrix4x4() 
-m = m.multiply(CSG.Matrix4x4.rotationX(40)); +m = m.multiply(CSG.Matrix4x4.rotationX(40)) 
-m = m.multiply(CSG.Matrix4x4.rotationZ(40)); +m = m.multiply(CSG.Matrix4x4.rotationZ(40)) 
-m = m.multiply(CSG.Matrix4x4.translation([-.5,​ 0, 0])); +m = m.multiply(CSG.Matrix4x4.translation([-.5,​ 0, 0])) 
-m = m.multiply(CSG.Matrix4x4.scaling([1.1,​ 1.2, 1.3]));+m = m.multiply(CSG.Matrix4x4.scaling([1.1,​ 1.2, 1.3]))
  
 // and apply the transform: // and apply the transform:
-var cube3 = cube().transform(m);+var cube3 = cube().transform(m)
 </​code>​ </​code>​