Linux dpw.dpwebtech.com 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
Apache
: 192.232.243.69 | : 3.148.117.167
54 Domain
7.3.33
dpclient
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
dpclient /
public_html /
new-3d-demo2 /
bikni_2 /
[ HOME SHELL ]
Name
Size
Permission
Action
3D
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwxr-xr-x
nbproject
[ DIR ]
drwxr-xr-x
GLTFLoader.js
40.04
KB
-rw-r--r--
OrbitControls.js
10.7
KB
-rw-r--r--
background.jpg
288.63
KB
-rw-r--r--
base-3d.js
76.17
KB
-rw-r--r--
display-3d.js
18.35
KB
-rw-r--r--
index.php
3.36
KB
-rw-r--r--
suit3pcs.js
7.8
KB
-rw-r--r--
sz-utils.js
15.37
KB
-rw-r--r--
sz.js
11.99
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : base-3d.js
Sz.packages(function (Sz, window, document) { Sz.add("Base3D", function (Datastore) { //alert('adasd'); Sz.extend(Datastore, { Mesh: [], Font: [], Material: [], useHelper: false }); function Base3D(options, callback) { var settings, Canvas, Libs, Scene, Camera, Light, Renderer, Controls, Loader; settings = { canvas: document.createElement("canvas"), routes: null }; Sz.extend(settings, options); Canvas = Sz(settings.canvas).get(0); if (Sz.isFunction(options)) { callback = options; } if (Sz.isUndefined(Base3D.instance)) { Libs = window.THREE; Scene = new Libs.Scene(); Camera = new Libs.PerspectiveCamera(22, window.innerWidth / window.innerHeight, 1, 1000); Camera.position.set(0, 2, 18); Camera.lookAt(Scene.position); Light = { Hemisphere: new Libs.HemisphereLight(0xffffff, 0xffffff, 0.20), Directional: new Libs.DirectionalLight(0xffffff, 0.4), PointLightL: new Libs.PointLight(0xffffff, 0.3, 100), PointLightR: new Libs.PointLight(0xffffff, 1.2, 100), PointLightF: new Libs.PointLight(0xffffff, 0.4, 100), PointLightB: new Libs.PointLight(0xffffff, 0.85, 100) }; Light.Hemisphere.position.set(0, 10, 0); Light.Directional.position.set(0, 5, 5); Light.PointLightL.position.set(-5, 3, -3); Light.PointLightR.position.set(5, 3, 3); Light.PointLightF.position.set(-1.5, 0, 5); Light.PointLightB.position.set(0, -0.25, -5); Sz.each(Light, function (name, obj) { obj.name = name; Scene.add(obj); }); if (Sz.isTrue(Datastore.useHelper)) { Scene.add(new Libs.HemisphereLightHelper(Light.Hemisphere, 0.5)); Scene.add(new Libs.DirectionalLightHelper(Light.Directional, 0.5)); Scene.add(new Libs.PointLightHelper(Light.PointLightL, 0.5)); Scene.add(new Libs.PointLightHelper(Light.PointLightR, 0.5)); Scene.add(new Libs.PointLightHelper(Light.PointLightF, 0.5)); Scene.add(new Libs.PointLightHelper(Light.PointLightB, 0.5)); Scene.add(new Libs.GridHelper(50, 50)); } Renderer = new Libs.WebGLRenderer({ canvas: Canvas, alpha: true, antialias: true, stencil: false, powerPreference: "high-performance" }); Renderer.setPixelRatio(window.devicePixelRatio); Controls = { Orbit: new Libs.OrbitControls(Camera, Renderer.domElement) }; Controls.Orbit.enabled = true; Controls.Orbit.enableDamping = true; Controls.Orbit.dampingFactor = 1; Controls.Orbit.enableKeys = false; Controls.Orbit.minPolarAngle = 75 * Libs.MathUtils.DEG2RAD; Controls.Orbit.maxPolarAngle = 75 * Libs.MathUtils.DEG2RAD; Controls.Orbit.screenSpacePanning = true; Controls.Orbit.enablePan = true; Controls.Orbit.enableRotate = true; Controls.Orbit.enableZoom = true; Controls.Orbit.minDistance = Controls.Orbit.target.distanceTo(Camera.position) / 1.5; Controls.Orbit.maxDistance = Controls.Orbit.target.distanceTo(Camera.position) * 1.5; Controls.Orbit.target.set(0, 0, 0); Controls.Orbit.update(); Loader = { GLTF: new Libs.GLTFLoader(), Texture: new Libs.TextureLoader(), Font: new Libs.FontLoader() }; Base3D.instance = { Canvas: Canvas, Libs: Libs, Scene: Scene, Camera: Camera, Light: Light, Renderer: Renderer, Controls: Controls, Loader: Loader, Routes: settings.routes, resize: function () { var target, needsResize; target = Renderer.domElement; needsResize = (target.width !== target.clientWidth) || (target.height !== target.clientHeight); if (needsResize) { Renderer.setSize(target.clientWidth, target.clientHeight, false); } return needsResize; }, refresh: function (updateProjectionMatrix) { var target, needsResize; target = Renderer.domElement; needsResize = Base3D.instance.resize(); if (needsResize || Sz.isTrue(updateProjectionMatrix)) { Camera.aspect = target.clientWidth / target.clientHeight; Camera.updateProjectionMatrix(); } Renderer.render(Scene, Camera); }, getState: (function (callback) { var state, spherical; state = { Camera: { position: this.object.position.clone() }, Controls: { Orbit: { target: this.target.clone(), enabled: this.enabled, enableRotate: this.enableRotate, maxDistance: this.maxDistance, minDistance: this.minDistance } } }; spherical = new Libs.Spherical().setFromVector3(this.object.position); if (Sz.isFunction(callback)) { callback(state, spherical); } return state; }).bind(Object.assign({}, Controls.Orbit, { object: Controls.Orbit.object.clone() })), getRadians: function (angle) { var vector, axis, spherical; vector = new Libs.Vector3(0, 0, 1); axis = new Libs.Vector3(0, 1, 0); vector.applyAxisAngle(axis, angle * Libs.MathUtils.DEG2RAD); spherical = new Libs.Spherical().setFromVector3(vector); return spherical.theta; } }; Controls.Orbit.addEventListener("change", Base3D.instance.refresh); window.addEventListener("resize", Base3D.instance.refresh, false); } if (Sz.isFunction(callback)) { callback(Base3D.instance); } return Base3D.instance; } Base3D.getMesh = function () { return Sz.makeArray(Datastore.Mesh); }; Base3D.getFont = function () { return Sz.makeArray(Datastore.Font); }; Base3D.getMaterial = function () { return Sz.makeArray(Datastore.Material); }; Base3D.GLTFLoader = function (url, callback, progress, errors) { var mesh = Datastore.Mesh.find(function (current) { return Sz.lowercase(current.url) === Sz.lowercase(url); }); if (Sz.isUndefined(mesh)) { if (Sz.isFunction(progress)) { progress(0); } if (Sz.isString(url)) { Base3D.instance.Loader.GLTF.load(url, function (gltf) { gltf.scene.traverse(function (child) { if (child.isMesh) { child.castShadow = true; child.receiveShadow = true; } }); Datastore.Mesh.push({ url: url, resource: gltf }); if (Sz.isFunction(callback)) { callback(gltf); } }, function (xhr) { if (Sz.isFunction(progress)) { progress(xhr.loaded / xhr.total * 100); } }, errors); } } else { if (Sz.isFunction(progress)) { progress(100); } if (Sz.isFunction(callback)) { callback(mesh.resource); } } }; Base3D.TextureLoader = function (url, callback, progress, errors) { var texture = Datastore.Material.find(function (current) { return Sz.lowercase(current.url) === Sz.lowercase(url); }); if (Sz.isUndefined(texture)) { if (Sz.isFunction(progress)) { progress(0); } if (Sz.isString(url)) { Base3D.instance.Loader.Texture.load(url, function (resource) { Datastore.Material.push({ url: url, resource: resource }); if (Sz.isFunction(callback)) { callback(resource); } }, function (xhr) { if (Sz.isFunction(progress)) { progress(xhr.loaded / xhr.total * 100); } }, errors); } } else { if (Sz.isFunction(progress)) { progress(100); } if (Sz.isFunction(callback)) { callback(texture.resource); } } }; Base3D.FontLoader = function (url, callback, progress, errors) { var font = Datastore.Font.find(function (current) { return Sz.lowercase(current.url) === Sz.lowercase(url); }); if (Sz.isUndefined(font)) { if (Sz.isFunction(progress)) { progress(0); } if (Sz.isString(url)) { Base3D.instance.Loader.Font.load(url, function (resource) { Datastore.Font.push({ url: url, resource: resource }); if (Sz.isFunction(callback)) { callback(resource); } }, function (xhr) { if (Sz.isFunction(progress)) { progress(xhr.loaded / xhr.total * 100); } }, errors); } } else { if (Sz.isFunction(progress)) { progress(100); } if (Sz.isFunction(callback)) { callback(font.resource); } } }; Base3D.Loader = function (source, callback, progress, errors) { var total, loaded; total = 0; loaded = 0; if (Sz.isNot(source, Sz.isArray)) { return false; } source.forEach(function (current) { if (Sz.isString(current.mesh)) { total += 1; } if (Sz.isString(current.font)) { total += 1; } if (Sz.isObject(current.material)) { total += Sz.size(current.material); } }); if (Sz.isFunction(progress)) { progress(0); } source.forEach(function (current) { if (Sz.isString(current.mesh)) { Base3D.GLTFLoader(current.mesh, function (obj) { current.mesh = obj; loaded += 1; if (Sz.isFunction(progress)) { progress(Math.round(loaded / total * 100)); } if (Sz.isFunction(callback) && (total === loaded)) { callback(source); } }, null, function (err) { loaded += 1; if (Sz.isFunction(progress)) { progress(Math.round(loaded / total * 100)); } if (Sz.isFunction(callback) && (total === loaded)) { callback(source); } if (Sz.isFunction(errors)) { errors(err); } }); } if (Sz.isString(current.font)) { Base3D.FontLoader(current.font, function (obj) { current.font = obj; loaded += 1; if (Sz.isFunction(progress)) { progress(Math.round(loaded / total * 100)); } if (Sz.isFunction(callback) && (total === loaded)) { callback(source); } }, null, function (err) { loaded += 1; if (Sz.isFunction(progress)) { progress(Math.round(loaded / total * 100)); } if (Sz.isFunction(callback) && (total === loaded)) { callback(source); } if (Sz.isFunction(errors)) { errors(err); } }); } if (Sz.isObject(current.material)) { Sz.each(current.material, function (name, url) { Base3D.TextureLoader(url, function (obj) { current.material[name] = obj; loaded += 1; if (Sz.isFunction(progress)) { progress(Math.round(loaded / total * 100)); } if (Sz.isFunction(callback) && (total === loaded)) { callback(source); } }, null, function (err) { loaded += 1; if (Sz.isFunction(progress)) { progress(Math.round(loaded / total * 100)); } if (Sz.isFunction(callback) && (total === loaded)) { callback(source); } if (Sz.isFunction(errors)) { errors(err); } }); }); } }); }; Base3D.callback = function (response) { var Group, removed; Group = new response.instance.Libs.Group(); Group.add(response.resource); removed = []; response.instance.Scene.traverse(function (child) { if ((child instanceof response.instance.Libs.Group) && (child.uuid !== Group.uuid)) { removed.push(child); } }); removed.forEach(function (child) { response.instance.Scene.remove(child); }); response.instance.Scene.add(Group); response.instance.refresh(); }; Base3D.blender = function (options, callback, progress, errors) { var settings, Libs, Scene, Group, args; settings = { refid: null, name: null, source: [], preview: [], repeat: { ratio: 1, scale: 22, maxWidth: 250 } }; Sz.extend(true, settings, options); Libs = Base3D.instance.Libs; Scene = Base3D.instance.Scene; Group = new Libs.Group(); if (Sz.isString(settings.name)) { Group.name = settings.name; } args = { name: settings.name }; if (Sz.isFunction(callback)) { callback = callback.bind(args); } if (Sz.isFunction(progress)) { progress = progress.bind(args); } if (Sz.isFunction(errors)) { errors = errors.bind(args); } if (Sz.isNot(settings.source, Sz.isEmpty)) { Base3D.Loader(settings.source, function (source) { source.forEach(function (current) { var roughnessMap, normalMap, texture, repeat; if (Sz.isNot(current.mesh, Sz.isObject)) { return false; } if (Sz.isObject(current.material)) { roughnessMap = current.material.roughnessMap; normalMap = current.material.normalMap; texture = current.material.texture; } current.mesh.scene.traverse(function (child) { if (Sz.isFalse(child instanceof Libs.Mesh)) { return false; } child.material.needsUpdate = true; child.material.metalness = 0; if (roughnessMap instanceof Libs.Texture) { child.material.roughnessMap = roughnessMap; child.material.metalness = 0.25; } if (normalMap instanceof Libs.Texture) { child.material.normalMap = normalMap; child.material.normalScale = new Libs.Vector2(0, 1); } if (texture instanceof Libs.Texture) { child.material.map = texture; texture.wrapS = Libs.RepeatWrapping; texture.wrapT = Libs.RepeatWrapping; repeat = { width: texture.image.naturalWidth, height: texture.image.naturalHeight, ratio: settings.repeat.ratio, scale: settings.repeat.scale, maxWidth: settings.repeat.maxWidth }; if (repeat.width > repeat.height) { repeat.ratio = repeat.width / repeat.height; } else { repeat.ratio = repeat.height / repeat.width; } if (repeat.width > repeat.maxWidth) { texture.repeat.set(repeat.ratio, 1); } else { repeat.scale = (repeat.width * repeat.scale) / repeat.maxWidth; texture.repeat.set(repeat.ratio * repeat.scale, 1 * repeat.scale); } } }); if (Sz.isFunction(current.geometry)) { current.geometry(current.mesh, current); } Group.add(current.mesh.scene); }); if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback({ refid: settings.refid, instance: Base3D.instance, resource: Group, preview: settings.preview }); }, progress, errors); } else { if (Sz.isFunction(progress)) { progress(100); } if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback({ refid: settings.refid, instance: Base3D.instance, resource: Group, preview: settings.preview }); } }; Base3D.init = function (options) { var settings, Routes; settings = { preview: [], designs: {} }; Routes = Base3D.instance.Routes; Sz.extend(settings, options, { filetype: "gltf", source: [], paths: { JSONFont: Sz.implode("/", [Routes.site, "assets/font/json"]), model: { //Jacket: Sz.implode("/", [Routes.Res3D, "Render/Models/Jacket"]), // Pant: Sz.implode("/", [Routes.Res3D, "Render/Models/Pant"]), Vest: Sz.implode("/", [Routes.Res3D, "Render/Models/Vest"]) }, roughnessMap: Sz.implode("/", [Routes.Res3D, "Render/RoughnessMap"]), normalMap: Sz.implode("/", [Routes.Res3D, "Render/NormalMap"]), fabric: Sz.implode("/", [Routes.Res3D, "Render/Textures/Fabric"]), lining: Sz.implode("/", [Routes.Res3D, "Render/Textures/Lining"]), piping: Sz.implode("/", [Routes.Res3D, "Render/Textures/Piping"]), backCollar: Sz.implode("/", [Routes.Res3D, "Render/Textures/BackCollar"]), button: Sz.implode("/", [Routes.Res3D, "Render/Textures/Button"]), thread: Sz.implode("/", [Routes.Res3D, "Render/Textures/Thread"]) } }); return settings; }; Base3D.Jacket = function (options, callback, progress, errors) { var init, paths, model, roughnessMap, normalMap, designs; init = Base3D.init(options); /*if (Sz.isFalse(Sz.inArray("Jacket", init.preview))) { return false; }*/ paths = init.paths; model = init.paths.model.Jacket; roughnessMap = init.paths.roughnessMap; normalMap = init.paths.normalMap; designs = init.designs; /*init.source.push({ mesh: Sz.implode("/", [ model, "Front/Bottom", designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Bottom.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Front/Button", designs.Jacket.Button.id, Sz.implode(".", [designs.Contrast.Jacket.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Front/Thread", Sz.implode(".", [designs.Jacket.Button.id, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Buttonhole.id, "jpg"]) ]) } }); if (Sz.isFalse(Sz.inArray(designs.Jacket.Lapel.id, ["CL4"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Lapel", designs.Jacket.Lapel.Width.id, "Upper", designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Lapel.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Jacket.LapelUpper)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); if (Sz.inArray(designs.Jacket.Lapel.Buttonhole.id, ["Closed"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Lapel", designs.Jacket.Lapel.Width.id, "Buttonhole", designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Lapel.id, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Buttonhole.id, "jpg"]) ]) } }); } } init.source.push({ mesh: Sz.implode("/", [ model, "Lapel", designs.Jacket.Lapel.Width.id, "Lower", designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Lapel.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Jacket.LapelLower)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } });*/ /*init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", Sz.implode(".", ["Sleeve", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", designs.Jacket.Sleeve.style, designs.Jacket.Sleeve.button, Sz.implode(".", [designs.Contrast.Jacket.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", designs.Jacket.Sleeve.style, "LastButton", Sz.implode(".", [designs.Contrast.Jacket.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", designs.Jacket.Sleeve.style, "Thread", Sz.implode(".", [designs.Jacket.Sleeve.button, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Buttonhole.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", designs.Jacket.Sleeve.style, "Thread", Sz.implode(".", ["LastThread", init.filetype]) ]), material: { texture: (function (id) { if (Sz.inArray(id, ["None"])) { id = designs.Contrast.Jacket.Buttonhole.id; } return Sz.implode("/", [ paths.thread, Sz.implode(".", [id, "jpg"]) ]); })(designs.Contrast.Jacket.LastButtonhole.id) } }); if (Sz.isTrue(designs.Contrast.Jacket.Elbow)) { init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", Sz.implode(".", ["Elbow", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Contrast.id, "jpg"]) ]) } }); } init.source.push({ mesh: Sz.implode("/", [ model, "Pocket", Sz.implode(".", [designs.Jacket.Pocket.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Jacket.Pocket)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); if (Sz.isTrue(designs.Jacket.Pocket.Breast)) { init.source.push({ mesh: Sz.implode("/", [ model, "Pocket", Sz.implode(".", ["ChestPocket", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Jacket.ChestPocket)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); } init.source.push({ mesh: Sz.implode("/", [ model, "Vent", Sz.implode(".", [designs.Jacket.Vent.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Lining", Sz.implode(".", ["Sleeve", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.lining, Sz.implode(".", [designs.Contrast.Jacket.Lining.id, "jpg"]) ]) } });*/ /*if (Sz.isFalse(Sz.inArray(designs.Contrast.Jacket.Lining.Style.id, ["Unlined"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", [designs.Jacket.Bottom.id, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.lining, Sz.implode(".", [designs.Contrast.Jacket.Lining.id, "jpg"]) ]) } }); } if (Sz.inArray(designs.Contrast.Jacket.Lining.Style.id, ["HalfLined", "Unlined"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", ["Line", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.piping, Sz.implode(".", [designs.Contrast.Jacket.Piping.id, "jpg"]) ]) } }); } if (Sz.inArray(designs.Contrast.Jacket.Topstitching.id, ["Lapel", "FullBody"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Topstitching/Lapel", designs.Jacket.Lapel.Width.id, designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Lapel.id, init.filetype]) ]), material: { texture: (function () { if (Sz.inArray(designs.Contrast.Jacket.Topstitching.Option.id, ["2"])) { return Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Topstitching.Color.id, "jpg"]) ]); } return Sz.implode("/", [ paths.thread, Sz.implode(".", ["A00", "jpg"]) ]); })() } }); if (Sz.isFalse(Sz.inArray(designs.Jacket.Pocket.id, ["PK-5", "PK-6"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Topstitching/Pocket", Sz.implode(".", [designs.Jacket.Pocket.id, init.filetype]) ]), material: { texture: (function () { if (Sz.inArray(designs.Contrast.Jacket.Topstitching.Option.id, ["2"])) { return Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Topstitching.Color.id, "jpg"]) ]); } return Sz.implode("/", [ paths.thread, Sz.implode(".", ["A00", "jpg"]) ]); })() } }); } if (Sz.isTrue(designs.Jacket.Pocket.Breast)) { init.source.push({ mesh: Sz.implode("/", [ model, "Topstitching/Pocket", Sz.implode(".", ["ChestPocket", init.filetype]) ]), material: { texture: (function () { if (Sz.inArray(designs.Contrast.Jacket.Topstitching.Option.id, ["2"])) { return Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Topstitching.Color.id, "jpg"]) ]); } return Sz.implode("/", [ paths.thread, Sz.implode(".", ["A00", "jpg"]) ]); })() } }); } } if (Sz.inArray(designs.Contrast.Jacket.Topstitching.id, ["FullBody"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Topstitching/Front", designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Bottom.id, init.filetype]) ]), material: { texture: (function () { if (Sz.inArray(designs.Contrast.Jacket.Topstitching.Option.id, ["2"])) { return Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Topstitching.Color.id, "jpg"]) ]); } return Sz.implode("/", [ paths.thread, Sz.implode(".", ["A00", "jpg"]) ]); })() } }); }*/ Base3D.blender({ refid: options.refid, name: "Jacket", source: init.source, preview: init.preview }, function (response) { Base3D.getMesh().forEach(function (current) { if (current.url.match(/Jacket\/Topstitching/i)) { current.resource.scene.traverse(function (child) { if (child.isMesh) { child.material.needsUpdate = true; child.material.transparent = true; child.material.opacity = 0.7; } }); } }); if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback.call(this, response, options); }, progress, errors); }; Base3D.Pant = function (options, callback, progress, errors) { var init, paths, model, roughnessMap, normalMap, designs; init = Base3D.init(options); /*if (Sz.isFalse(Sz.inArray("Pant", init.preview))) { return false; }*/ paths = init.paths; model = init.paths.model.Pant; roughnessMap = init.paths.roughnessMap; normalMap = init.paths.normalMap; designs = init.designs; /*init.source.push({ mesh: Sz.implode("/", [ model, "Style", designs.Pant.Pleats.id, Sz.implode(".", [designs.Pant.Style.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Lining", Sz.implode(".", [designs.Pant.Style.id, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.lining, Sz.implode(".", ["10", "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Waistband", Sz.implode(".", [designs.Pant.Beltloops.Waistband.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } });*/ /* if (Sz.isTrue(designs.Pant.Beltloops.Waistband.button)) { init.source.push({ mesh: Sz.implode("/", [ model, "Waistband/Button", Sz.implode(".", [designs.Contrast.Pant.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Waistband/Button", Sz.implode(".", ["Thread", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Pant.Buttonhole.id, "jpg"]) ]) } }); } if (Sz.isFalse(Sz.inArray(designs.Pant.Beltloops.id, ["None"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Beltloops", Sz.implode(".", [designs.Pant.Beltloops.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Pant.Beltloops)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); } if (Sz.isTrue(designs.Pant.Beltloops.button)) { init.source.push({ mesh: Sz.implode("/", [ model, "Beltloops/Button", Sz.implode(".", [designs.Contrast.Pant.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Beltloops/Button", Sz.implode(".", ["Thread", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Pant.Buttonhole.id, "jpg"]) ]) } }); } if (Sz.isFalse(Sz.inArray(designs.Pant.Pocket.id, ["None"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Pocket", Sz.implode(".", [designs.Pant.Pocket.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); }*/ /*init.source.push({ mesh: Sz.implode("/", [ model, "BackPocket", designs.Pant.BackPocket.Position.id, Sz.implode(".", [designs.Pant.BackPocket.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Pant.BackPocket)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); if (Sz.isTrue(designs.Pant.BackPocket.button)) { init.source.push({ mesh: Sz.implode("/", [ model, "BackPocket", designs.Pant.BackPocket.Position.id, "ButtonFlap", Sz.implode(".", [designs.Contrast.Pant.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "BackPocket", designs.Pant.BackPocket.Position.id, "ButtonFlap", Sz.implode(".", ["Thread", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Pant.Buttonhole.id, "jpg"]) ]) } }); } if (Sz.isFalse(Sz.inArray(designs.Pant.Cuff.id, ["None"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Cuff", designs.Pant.Style.id, Sz.implode(".", ["Cuff", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Cuff", designs.Pant.Style.id, Sz.implode(".", [designs.Pant.Cuff.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); }*/ /*if (Sz.isTrue(designs.Pant.Cuff.button)) { init.source.push({ mesh: Sz.implode("/", [ model, "Cuff", designs.Pant.Style.id, designs.Pant.Cuff.id, "Button", Sz.implode(".", [designs.Contrast.Pant.Button.id, init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Cuff", designs.Pant.Style.id, designs.Pant.Cuff.id, "Button", Sz.implode(".", ["Thread", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Pant.Buttonhole.id, "jpg"]) ]) } }); } */ Base3D.blender({ refid: options.refid, name: "Pant", source: init.source, preview: init.preview, repeat: { scale: 23 } }, function (response) { if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback.call(this, response, options); }, progress, errors); }; Base3D.Vest = function (options, callback, progress, errors) { var init, paths, model, roughnessMap, normalMap, designs; init = Base3D.init(options); if (Sz.isFalse(Sz.inArray("Vest", init.preview))) { return false; } paths = init.paths; model = init.paths.model.Vest; roughnessMap = init.paths.roughnessMap; normalMap = init.paths.normalMap; designs = init.designs; init.source.push({ mesh: Sz.implode("/", [ //model, "Bottom/6Button/dummy.gltf", model, "Bottom", designs.Vest.Button.id, Sz.implode(".", [designs.Vest.Pocket.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Bottom/6Button/triangle_model_cup_pink.gltf", //model, "Bottom", designs.Vest.Button.id, //Sz.implode(".", [designs.Vest.Pocket.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, // Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); /*init.source.push({ mesh: Sz.implode("/", [ //model, "Bottom/6Button/dummy.gltf", model, "Bottom", designs.Vest.Button.id, Sz.implode(".", [designs.Vest.Bottom.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } });*/ /* init.source.push({ mesh: Sz.implode("/", [ model, "Bottom/6Button/bikni_yellow.gltf", //model, "Bottom", designs.Vest.Button.id, //Sz.implode(".", [designs.Vest.Bottom.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } });*/ /* init.source.push({ mesh: Sz.implode("/", [ model, "Bottom/6Button/9_collar.gltf", //model, "Bottom", designs.Vest.Button.id, //Sz.implode(".", [designs.Vest.Bottom.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Bottom/6Button/9_sleeve.gltf", //model, "Bottom", designs.Vest.Button.id, //Sz.implode(".", [designs.Vest.Bottom.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } });*/ /* init.source.push({ mesh: Sz.implode("/", [ model, "Back", Sz.implode(".", ["Back", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); if (Sz.inArray(designs.Vest.Back.id, ["Belt"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Back/Belt", Sz.implode(".", ["Buckle", init.filetype]) ]) }); init.source.push({ mesh: Sz.implode("/", [ model, "Back/Belt", Sz.implode(".", ["Strap", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); } init.source.push({ mesh: Sz.implode("/", [ model, "Lining", designs.Vest.Button.id, Sz.implode(".", [designs.Vest.Bottom.id, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.lining, Sz.implode(".", [designs.Contrast.Vest.Lining.id, "jpg"]) ]) } }); if (Sz.isFalse(Sz.inArray(designs.Vest.Neckline.id, ["VNeck"]))) { if (Sz.isFalse(Sz.inArray(designs.Vest.Neckline.id, ["Shawl"]))) { init.source.push({ mesh: Sz.implode("/", [ model, "Neckline/Upper", designs.Vest.Button.id, Sz.implode(".", [designs.Vest.Neckline.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Vest.Lapel)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); } init.source.push({ mesh: Sz.implode("/", [ model, "Neckline/Lower", designs.Vest.Button.id, Sz.implode(".", [designs.Vest.Neckline.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Vest.Lapel)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); } init.source.push({ mesh: Sz.implode("/", [ model, "Pocket", Sz.implode(".", [designs.Vest.Pocket.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: (function (id) { if (Sz.isTrue(designs.Contrast.Vest.Pocket)) { id = designs.Contrast.id; } return Sz.implode("/", [ paths.fabric, Sz.implode(".", [id, "jpg"]) ]); })(designs.Fabric.id) } }); if (Sz.inArray(designs.Contrast.Vest.Button.id, ["S8"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Button", designs.Vest.Button.id, Sz.implode(".", [designs.Contrast.Vest.Button.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, "Button-S8.png"]), texture: Sz.implode("/", [paths.button, "S66.jpg"]) } }); } else { init.source.push({ mesh: Sz.implode("/", [ model, "Button", designs.Vest.Button.id, Sz.implode(".", [designs.Contrast.Vest.Button.id, init.filetype]) ]) }); } init.source.push({ mesh: Sz.implode("/", [ model, "Thread", Sz.implode(".", [designs.Vest.Button.id, init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Vest.Buttonhole.id, "jpg"]) ]) } });*/ Base3D.blender({ refid: options.refid, name: "Vest", source: init.source, preview: init.preview, repeat: { scale: 23 } }, function (response) { if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback.call(this, response, options); }, progress, errors); }; Base3D.JacketInteriorLining = function (options, callback, progress, errors) { var init, paths, model, roughnessMap, normalMap, designs; init = Base3D.init(options); if (Sz.isFalse(Sz.inArray("JacketInteriorLining", init.preview))) { return false; } paths = init.paths; model = init.paths.model.Jacket; roughnessMap = init.paths.roughnessMap; normalMap = init.paths.normalMap; designs = init.designs; init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", ["Fabric", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); if (Sz.inArray(designs.Contrast.Jacket.Lining.Style.id, ["HalfLined", "FullyLined"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", ["Sleeve", init.filetype]) ]), material: (function () { return { texture: Sz.implode("/", [ paths.lining, Sz.implode(".", [designs.Contrast.Jacket.Lining.id, "jpg"]) ]) }; })() }); init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", ["Lining", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.lining, Sz.implode(".", [designs.Contrast.Jacket.Lining.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", ["Seam", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.piping, Sz.implode(".", [designs.Contrast.Jacket.Piping.id, "jpg"]) ]) } }); } if (Sz.inArray(designs.Contrast.Jacket.Lining.Style.id, ["Unlined", "HalfLined"])) { init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", designs.Contrast.Jacket.Lining.Style.id, Sz.implode(".", ["Line", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.piping, Sz.implode(".", [designs.Contrast.Jacket.Piping.id, "jpg"]) ]) } }); } init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", Sz.implode(".", ["Pocket", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.piping, Sz.implode(".", [designs.Contrast.Jacket.Piping.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Interior/Lining", Sz.implode(".", ["SmallPocket", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.piping, Sz.implode(".", [designs.Contrast.Jacket.Piping.id, "jpg"]) ]) } }); init.source.push({ font: Sz.implode("/", [paths.JSONFont, "MonotypeCorsiva.json"]) }); init.source.push({ material: { texture: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Monogram.Color.id, "jpg"]) ]) } }); Base3D.blender({ refid: options.refid, name: "JacketInteriorLining", source: init.source, preview: init.preview, repeat: { scale: 23 } }, function (response) { var monogram, material, geometry, mesh; if (Sz.isTrue(designs.Contrast.Jacket.Monogram.option)) { monogram = { font: Sz.implode("/", [paths.JSONFont, "MonotypeCorsiva.json"]), color: Sz.implode("/", [ paths.thread, Sz.implode(".", [designs.Contrast.Jacket.Monogram.Color.id, "jpg"]) ]) }; material = new Base3D.instance.Libs.MeshStandardMaterial({ map: (function () { var found = Base3D.getMaterial().find(function (current) { return current.url === monogram.color; }); if (Sz.isObject(found)) { return found.resource; } })() }); if (Sz.isTrue(designs.Contrast.Jacket.Monogram.Specially)) { geometry = new Base3D.instance.Libs.TextGeometry("Specially Tailored For", { font: (function () { var found = Base3D.getFont().find(function (current) { return current.url === monogram.font; }); if (Sz.isObject(found)) { return found.resource; } })(), size: 0.04, height: 0.005 }); geometry.computeBoundingBox(); geometry.center(); mesh = new Base3D.instance.Libs.Mesh(geometry, material); mesh.position.set(0.7, 0.48, 0.56); mesh.rotation.set(-0.03, 0.7, 0); response.resource.add(mesh); } if (Sz.isString(designs.Contrast.Jacket.Monogram.Initial)) { geometry = new Base3D.instance.Libs.TextGeometry(designs.Contrast.Jacket.Monogram.Initial, { font: (function () { var found = Base3D.getFont().find(function (current) { return current.url === monogram.font; }); if (Sz.isObject(found)) { return found.resource; } })(), size: 0.04, height: 0.005 }); geometry.computeBoundingBox(); geometry.center(); mesh = new Base3D.instance.Libs.Mesh(geometry, material); mesh.position.set(0.7, 0.4, 0.56); mesh.rotation.set(-0.03, 0.7, 0); response.resource.add(mesh); } } if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback.call(this, response, options); }, progress, errors); }; Base3D.VestInteriorLining = function (options, callback, progress, errors) { var init, paths, model, roughnessMap, normalMap, designs; init = Base3D.init(options); if (Sz.isFalse(Sz.inArray("VestInteriorLining", init.preview))) { return false; } paths = init.paths; model = init.paths.model.Vest; roughnessMap = init.paths.roughnessMap; normalMap = init.paths.normalMap; designs = init.designs; init.source.push(); Base3D.blender({ refid: options.refid, name: "VestInteriorLining", source: init.source, preview: init.preview, repeat: { scale: 23 } }, function (response) { if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback.call(this, response, options); }, progress, errors); }; Base3D.BackCollar = function (options, callback, progress, errors) { var init, paths, model, roughnessMap, normalMap, designs; init = Base3D.init(options); if (Sz.isFalse(Sz.inArray("BackCollar", init.preview))) { return false; } paths = init.paths; model = init.paths.model.Jacket; roughnessMap = init.paths.roughnessMap; normalMap = init.paths.normalMap; designs = init.designs; init.source.push({ mesh: Sz.implode("/", [ model, "Front/Bottom", designs.Jacket.Button.id, Sz.implode(".", [designs.Jacket.Bottom.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Sleeve", Sz.implode(".", ["Sleeve", init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "Vent", Sz.implode(".", [designs.Jacket.Vent.id, init.filetype]) ]), material: { roughnessMap: Sz.implode("/", [roughnessMap, Sz.implode(".", [1, "png"])]), texture: Sz.implode("/", [ paths.fabric, Sz.implode(".", [designs.Fabric.id, "jpg"]) ]) } }); init.source.push({ mesh: Sz.implode("/", [ model, "BackCollar", Sz.implode(".", ["BackCollar", init.filetype]) ]), material: { texture: Sz.implode("/", [ paths.backCollar, Sz.implode(".", [designs.Contrast.Jacket.BackCollar.id, "jpg"]) ]) } }); Base3D.blender({ refid: options.refid, name: "BackCollar", source: init.source, preview: init.preview }, function (response) { if (Sz.isNot(callback, Sz.isFunction)) { callback = Base3D.callback; } callback.call(this, response, options); }, progress, errors); }; return Base3D; }); }); $(function () { $("#fabric").on("click", "li", function () { DesignOptions.Fabric.id = $(this).data("id"); Sz.Display3D.render(); }); /*$("#jacket-style").on("click", "li", function () { DesignOptions.Vest.Pocket.id = $(this).data("id"); //alert(DesignOptions.Vest.Bottom.id); Sz.Display3D.render(); });*/ $("#jacket-style").on("click", "li", function () { //DesignOptions.Vest.Pocket.id = $(this).data("id"); //alert(DesignOptions.Vest.Bottom.id); //alert('d'); Sz.Base3D.instance.Controls.Orbit.enableRotate = false; Sz.Base3D.instance.Controls.Orbit.update(); //sand = false; //Sz.Display3D.render(); }); $("#jacket-style1").on("click", "li", function () { //DesignOptions.Vest.Pocket.id = $(this).data("id"); //alert(DesignOptions.Vest.Bottom.id); //alert('d'); Sz.Base3D.instance.Controls.Orbit.enableRotate = true; Sz.Base3D.instance.Controls.Orbit.update(); //sand = false; //Sz.Display3D.render(); }); //jacket-style });
Close