Coder Social home page Coder Social logo

humu2009 / jsc3d Goto Github PK

View Code? Open in Web Editor NEW
93.0 19.0 53.0 59.57 MB

3D model viewer for design sharing and product exhibition.

Batchfile 0.01% Shell 0.01% HTML 82.94% JavaScript 16.95% Java 0.04% CSS 0.06%
3d canvas obj software-rendering stl webgl

jsc3d's Introduction

JSC3D

This project provides a javascript library for interactive presentation of 3D models and tiny scenes on web pages.

The library is not an all-purpose 3D engine but especially designed for design sharing and product exhibition. It is built on a pure software rendering pipeline as well as an optional WebGL back-end for efficient rasterization.

Please note that the library is completely OUTDATED nowadays. It should no longer be used in new applications. The project was launched in 2010 and being actively developed and maintained (on Google Code) till late 2014. During that time WebGL was still not available everywhere especially on mobile devices. So software rendering made sense where hardware acceleration was absent. Today, mordern browsers have been a light-year distant from that point. JSC3D is really old-fashioned and there are much better choices to develop online 3D applications upon. This should be thought of as an antiquity from the early days of HTML5 :-)

Features

A detailed introduction of this project can be read here.

Screenshots

BMW Dragon Mom & Baby iPhone 4 Map Skeletal Animation Submarine Japanese Architecture

Application

The development of this project was promoted by many people who were contributing patches, implementations as well as feedbacks and ideas. And there were a dozen of serious and interesting applications utilizing this library, some of which are introduced here.

jsc3d's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsc3d's Issues

Rotation system

Hi,

How to change the rotation system to get the effect of camera rotation around 
the model, not the model rotation in front of the camera in a fixed position? I 
mean as the effect of the 3D graphics programs such as Blender. When you move 
the camera over the object and the mouse is moved from side to side, the object 
rotates around the vertical axis, and not leaning to the side.

I tried to change rotateAboutXAxis and rotateAboutYAxis functions and variables 
rotX and rotY, with no good results.

Original issue reported on code.google.com by [email protected] on 15 Oct 2012 at 10:56

How to know an obj file is supporting textures?

What steps will reproduce the problem?

1. We loaded the attached obj file
2. We tried to set texture in selected meshes, but failed
3. But can set texture in other obj files

What is the expected output? What do you see instead?

 - We are need to set texture in selected mesh in all obj files.


What version of the product are you using? On what operating system?

 - We are using the latest version and OS is Windows/Linux


Please provide any additional information below.

 - Is there any way to check if the obj file / mesh supports texture?
 - If one obj file / mesh not support texture, how can we converted it to texture supporting one?

Please help us to resolve this problem




Original issue reported on code.google.com by [email protected] on 21 Jun 2013 at 7:20

Attachments:

unable to view the object

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
to write an html program using this script for displaying an object file inside 
the canvas from simple note pad text editor

What version of the product are you using? On what operating system?
latest version of jsc3d and windows xp

Please provide any additional information below.

i downloaded the latest version and tried to load and an object file from my 
hard disk.i used net beans ide and net beans connector. i referred the existing 
issues and configured chrome--allow--file--access--.i mapped the object file 
with mtl file and got my object along with texture in the canvas.i did this 
using net beans ide along with netbeans connector.i tried to run the html file 
outside the ide.i cud see only empty canvas.within fraction of secs i cud see 
some obj file status bar is loaded.but finally only i cud see an empty 
canvas.why i m unable to see the same output when i try to run it outside 
ide.is there any problem ?.what all are the possibilities to run it in the web 
browser using simple note pad text editor.is there anything necessary. where am 
i commiting  mistakes.any solutions?.is there any requirements. i have to 
convert this html file along with obj loaded into epub format.so it is very 
essential to view it from a web browser using simple note pad text editor. plz 
help me out to get rid of this issue.Thanks in Advance.I m waiting for the 
solution.

Original issue reported on code.google.com by [email protected] on 8 Jul 2013 at 5:42

Need to rotate XY co -ordinates only

What steps will reproduce the problem?
1. How should i disable the Z axis rotation?
2. I need Rotate the object in Left-Right, Right-Left direction only.
3. Disable The Bottom-Top, Top-Bottom Direction of Rotation

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 13 Jun 2013 at 6:32

do jsc3d support .rh format

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
i wish to load right hemisphere format file in the canvas

What version of the product are you using? On what operating system?


Please provide any additional information below.

do jsc3d support .rh format.if not what are other .js package that can support 
.rh file in the canvas.can u plz help me on this regard.

Original issue reported on code.google.com by [email protected] on 10 Jul 2013 at 11:53

My materials won't show in any browser

What steps will reproduce the problem?
1.
2. Testing my exported model in firefox
3.

What is the expected output? What do you see instead?
I expect to see my materials, instead it doesn't load any material


What version of the product are you using? On what operating system?
jsc3d-full-0.9.8, Windows 7

Please provide any additional information below.
I don't know why my textures/materials won't show, everything looks right.. 
help? I'm exporting an OBJECT file, maybe I'm exporting it wrong?

Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 1:45

Unable to reset scenes. Old STL data is retained.

What steps will reproduce the problem?
1. I have code which uses the FileReader object and StlLoader.parseStl to 
preview files locally. The application is intended to only preview one STL file 
at a time. When the first file is loaded I call functions init_viewer() and 
init_scene() and then load the file. If the user previews additional files, 
init_viewer and init_scene are called, however the geometry of the old files is 
visible as a flicker when the user does a mouse move. 

What is the expected output? What do you see instead?
-Expected should be normal rendered view of the most recently loaded STL file. 
Instead, when there is a mouse-move all previously loaded geometry is visible 
as a flicker. 

What version of the product are you using? On what operating system?
1.4.2, on ubuntu. 

Please provide any additional information below.

Relevant code: 

var handle_file_select = function(e) {
    e.stopPropagation()
    e.preventDefault()
    var viewer
    var theScene
    var f = e.target.files[0]
    var reader = new FileReader()
    var ext = f.name.split(".")[1]
    var mycanvas = document.getElementById('upload_canvas');
    var stl_loader = new JSC3D.StlLoader()

    function init_viewer() {
        viewer = new JSC3D.Viewer(mycanvas);
        viewer.setParameter('InitRotationX', 20);
        viewer.setParameter('InitRotationY', 20);
        viewer.setParameter('InitRotationZ', 0);
        viewer.setParameter('ModelColor', '#CAA618');
        viewer.setParameter('BackgroundColor1', '#FFFFFF');
        viewer.setParameter('BackgroundColor2', '#383840');
        viewer.setParameter('RenderMode', "flat");
    }

    function init_scene() {
        theScene = new JSC3D.Scene
        if (!(theScene.isEmpty)) {
            console.log(theScene)
        }
    }

    reader.onload = (function(file) {
        return function(e) {
            console.log("old scene: ", theScene)
            init_viewer()
            init_scene()
            stl_loader.parseStl(theScene, e.target.result)
            viewer.init()
            viewer.replaceScene(theScene)
            viewer.update()
        }
    })(f)

    if (ext.toLowerCase() != "stl") {
        alert("That doesn't appear to be an STL file.");
    } else {
        reader.readAsBinaryString(f)
    }
}

Sorry to post twice today!

Original issue reported on code.google.com by [email protected] on 2 Oct 2013 at 12:42

Infinite loop if loading OBJ with unclean face definitions

What steps will reproduce the problem?
I exported a 3D model from Blender to OBJ format. But the OBJ file seems to 
contain some faces with only 2 vertices (Reason unknown). This crashes the 
jsc3d viewer. There is no problem opening the file with Blender.

What is the expected output? What do you see instead?
I expected the "illegal" faces would be ignored. Instead, the jsc3d library 
runs into infinite loop.

What version of the product are you using? On what operating system?
jsc3d 0.7.2,
WinXP, Win7

Please provide any additional information below.
I debugged the library and found the reason for the infinite loop in several 
do-while-statements, which test for the sequence end "-1" in the index buffer 
(ibuf[j++] != -1). But if a sequence at the end of the buffer contains only 2 
elements, this test clause can never become true.

Anyway, I suggest a very easy fix: Just ignore faces with less than 3 elements 
when parsing the file.
Here's the code:

=== Code for "JSC3D.ObjLoader.prototype.parseObj" ===

case 'f':
    if(tokens.length >= 4) {        // Add this condition
        for(var j=1; j<tokens.length; j++) {
            var refs = tokens[j].split('/');
            curMesh.indexBuffer.push( parseInt(refs[0]) - 1 );
            if(refs.length > 1 && refs[1] != '') {
                if(!curMesh.texCoordIndexBuffer)
                    curMesh.texCoordIndexBuffer = [];
                curMesh.texCoordIndexBuffer.push( parseInt(refs[1]) - 1 );
            }
        }

        curMesh.indexBuffer.push(-1);
        if(curMesh.texCoordIndexBuffer)
            curMesh.texCoordIndexBuffer.push(-1);
    }
    break;

=== End of code ===

Original issue reported on code.google.com by [email protected] on 29 Apr 2012 at 3:16

Incorrect rendering on Safari 6

What steps will reproduce the problem?
1. View any JSC3D example in Safari 6 on Mac OS X 10.7 or 10.8.

What is the expected output? What do you see instead?
- The geometry looks very blocky compared to other browsers (including earlier 
versions of Safari).

What version of the product are you using? On what operating system?
- Latest source code. Mac OS X 10.7.4. Safari 6.0. (I am advised that the same 
problem occurs in Mac OS X 10.8.)

Please provide any additional information below.

- This may be related to some changes to how Safari 6 handles the Canvas 
element? If so, here is some info:

* http://www.html5rocks.com/en/tutorials/canvas/hidpi/
* http://www.phoboslab.org/log/2012/09/drawing-pixels-is-hard
* http://www.youtube.com/watch?v=_YvlaK3FvDA

- These changes apparently relate to Apple's new "retina display" devices, but 
my Mac is an old MacBook without a retina display.

Original issue reported on code.google.com by [email protected] on 29 Sep 2012 at 2:10

md2viewer.html

What steps will reproduce the problem?
1. run the md2viewer.html
2.
3.

What is the expected output? What do you see instead?
Failed to parse the file. It is not a valid MD2 file.

What version of the product are you using? On what operating system?
jsc3d-full-1.4.2/ Windows7

Please provide any additional information below.
kindly send me a working example of md2viewer? thank you

Original issue reported on code.google.com by [email protected] on 27 Oct 2013 at 2:54

viewer.getScene() seems to return false

I'm trying to load a simple non-textured .obj with
viewer.setParameter('SceneUrl',filename)

I can display it fine, but I cannot find a way to get attach a new texture to 
this object.

I assumed I'd have to get the scene with

viewer.getScene()

and then iterate through the meshes from scene.getChildren() and add a texture 
to each. But getScene() seems to return false even though the object has loaded 
and is displaying properly.

Is there some trick that I am missing here?  All the examples that use textures 
seem to work off either an mtl file (which I can't use because I need to 
control the textures in javascript) or without using .obj files. 

Finally, does this support, or will it support in the future, transparency?  
When I tried it it didn't seem to show any of the faces from behind the object, 
so I'm assuming it doesn't do that yet.


Original issue reported on code.google.com by [email protected] on 14 Oct 2012 at 9:20

viewer.setMouseUsage('rotate') does not work with md2.html

What steps will reproduce the problem?
1. using the md2viwer.html
2. put in the controls from the test.html page
3.

What is the expected output? What do you see instead?
I thought it would allow me to control the zoom and rotate separately.  instead 
it still only rotates and zooms if i hold down shift.  I also get the error 
that viewer.setMouseUsage('rotate') is not defined

What version of the product are you using? On what operating system?
im using jsc3d-full-0.9.8.  im using it on macOSX 10.6.8 and also on the ipad2.

Please provide any additional information below.
I wanted to use the separate controls since on the ipad it only rotates without 
the option of zoom unless your using the controls on test.html page.  it works 
with the other stationary models but not with the md2 model

Original issue reported on code.google.com by [email protected] on 23 May 2013 at 4:06

high resolution texture

Hello, i'm trying to get a hd texture render with jsc3d but at this very mment 
it failed.
My file is 4096x4096 px and the model is a wavefront obj.
this is my canvas setting :     

viewer.setParameter('SceneUrl', 'calculatrice/001zb.obj');
    viewer.setParameter('InitRotationX', 0);
    viewer.setParameter('InitRotationY', 0);
    viewer.setParameter('InitRotationZ', 0);
    viewer.setParameter('ModelColor', '#FFFFFF');
    viewer.setParameter('BackgroundColor1', '#FFFFFF');
    viewer.setParameter('BackgroundColor2', '#383840');
    viewer.setParameter('RenderMode', 'texturesmooth');
    viewer.setParameter('Definition', 'high');
    viewer.init();
    viewer.update();

should i change or add a parameter to the canvas to get a full hd render.
or should i add a parameter to my mtl file.

thank in advance for your reply.

Original issue reported on code.google.com by [email protected] on 30 Aug 2013 at 2:54

Chrome 30 crashes during texture rendering

= What steps will reproduce the problem?
1. Open Chrome 30.0.1599.101 (Windows or Mac)
2. Go to this URL : http://www.fabzat.com/tmp/bug_demo/
3. The browser often (or sometimes ?) crash after loading textures

= What is the expected output? What do you see instead?
Expected : 3D model is loaded normally
Reality : Chrome crashes with the "aw snap" message 
http://fabzat.com/tmp/bug_demo/aw-snap.png

= What version of the product are you using? On what operating system?
I can reproduce the problem on WIndows & Mac with Chrome version 30.0.1599.101 
(tested on 5 differents computers)
The version of the lib used is "JSC3D 1.4.2 full release"

= Please provide any additional information below.
The problem occurs in texture smooth rendering when calling method 
"transformVectorZs" (the first of two).
I tried to replace my textures with textures from one of the demos provided 
(bank), result is the same.
The problem does not occur if I remove texture files from server (aka 404 
errors on image files).
Problem occurs more often if webpage if on a remote server and not in a local 
network.
Problem occurs on the first load only. When files are in the browser cache, the 
problem dos not occur anymore.
Files to reproduce can be found here : 
http://fabzat.com/tmp/bug_demo/bug_demo.zip


I understand that this is a browser bug and not a jsc3d bug. But I need to find 
a workarournd for my production use.

Thanks for your help

Original issue reported on code.google.com by [email protected] on 12 Nov 2013 at 12:13

Remote URL in setParameter?

Dear,

I'd like to show a .stl file from the remote URL. I've tried to type the remote 
url in "viewer.setParameter('SceneUrl', remote_URL)", but it seems not work.

Is jsc3d workable in this situation? Thanks a lot

Original issue reported on code.google.com by [email protected] on 6 Nov 2013 at 8:43

Stl colour and background

I'm trying to customise. The colours for stl file display. The default is 
yellow objects in a grey gradient background.
Is there any way to change the colour schemes? I have tried changing the # 
colour codes in the php file but it makes no difference. 
Regards
Simon


Original issue reported on code.google.com by [email protected] on 17 Mar 2013 at 9:38

Zero surface normals in STL files

What steps will reproduce the problem?
1. Create any model in (for example) blender
2. Save as (binary) STL
3. View in jsc3d

What is the expected output? What do you see instead?

The object should be flat shaded - it's actually black.

What version of the product are you using? On what operating system?

Any version on any OS.

Please provide any additional information below.

The problem is that some STL exporters do not create normal vectors for each 
triangle - the standard (at least according to the Wikipedia page for the STL 
file format) is that the loader should test for zero length normals and compute 
it's own normal from the vertex coordinates of the triangle.  Worse still, the 
renderer uses the normal vector to do backface culling (which is pretty 
unconventional - most renderers use the vertex ordering to determine that).

Original issue reported on code.google.com by [email protected] on 19 Jul 2013 at 7:18

solution to load .md2 files

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

to view a animated object in the canvas
What version of the product are you using? On what operating system?


Please provide any additional information below.
i want to upload a single .md2 file in the javascript.i am new to 
javascripting. i unable to get the output using 
JSC3D.Md2Loader.prototype.loadFromUrl = function(urlName) function.kindly help 
me out to code to display a animated object in md2 format jus like as easy as 
uploading .obj file.is there any example ?
Thanks in Advance 

Original issue reported on code.google.com by [email protected] on 9 Jul 2013 at 7:29

[PATCH INCLUDED] Binary STLs entitled 'solid ...' trigger ascii STL loader

1. get Build_plate.stl from http://www.thingiverse.com/thing:12890
2. feed to jsc3d

due to my naive test, jsc3d thinks this is an ascii STL when really it's a 
binary STL entitled 'solid Build Plate'

--- jsc3d.js    2011-10-28 14:39:03.277821883 +1100
+++ ../../webskein/jsc3d.js 2011-10-28 14:52:34.491680315 +1100
@@ -4170,8 +4170,8 @@
    mesh.vertexBuffer = [];
    mesh.indexBuffer = [];
    mesh.faceNormalBuffer = [];

-   if (data.substring(0, 5).toLowerCase() == 'solid') {
+   if (data.match(/^solid[\s\S]*facet\s*normal/i)) {
        /*
            we have an ASCII STL file.


perhaps it would be better to run the full face pattern against it rather than 
this small snippet? Otherwise we'll still have this bug with binary STLs 
entitled 'solid .... facet normal'.

Original issue reported on code.google.com by [email protected] on 28 Oct 2011 at 4:02

large stl problem in IE9

What steps will reproduce the problem?
1.
you focus the attention about test_ie_compatible.html Demo
2.
you (for example) overwrite hard_milk.stl original model with one of the 2 
files here in attachments (if you do not want to change js code). 
3.
you run demo test and select hard_milk.stl


What is the expected output? What do you see instead?

internet explorer 9 or 10(preview) doesn't show anything and remains waiting lo 
load stl file. 


What version of the product are you using? On what operating system?
I use the latest  jsc3d 0.9.8 version on windows7 32 bit.

Please provide any additional information below.

In Chrome everything is perfect and I can see these 2 file in attachments. But 
in ie9 or 10 I cannot visualize them.
Is there any idea?
In ie9 it seems I may visualize stl file only if their size is small (200k or 
similar)


Original issue reported on code.google.com by [email protected] on 20 Nov 2012 at 10:42

Attachments:

How to load stl file in browser

Hii.

I am new to javascript please suggest me code to load stl file .I read previous 
problems and solution but doesnot get clear idea. Plz help me out?



Original issue reported on code.google.com by [email protected] on 19 Nov 2013 at 5:19

Zoom function

I would like to zoom in/out from a javascript buttons but I'm not sure how to 
code this.  Here is the line from the jsc3d.js file that I would need to 
execute:

this.zoomFactor *= this.mouseY <= e.clientY ? 1.11 : 0.9;


Any help would be greatly appreciated.  Also thank you for all your hard work 
with jsc3d, I'm finding a lot of uses for it.

Original issue reported on code.google.com by [email protected] on 5 Aug 2013 at 9:29

Documentation for stl

Is there some documentation explaining how to get this script to display an stl 
file.  All the examples work on obj files.

TIA

Original issue reported on code.google.com by [email protected] on 25 Jun 2012 at 11:29

Click event should get Clickd Object Details.

What steps will reproduce the problem?
1. Need to make color change in particular area
2. When click on the onject, event should return the details of only clicked 
object from scene
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Jun 2013 at 9:52

Inverse perspective

Hello

Unfortunate misunderstanding. Models are visualized with an inverted 
perspective: far edges larger than nigh. This is well illustrated in the 
examples of "sandiego", "map3d", "iphoneg4".
Using the latest version.
Can you please tell how to fix it.

Thank you.

Original issue reported on code.google.com by [email protected] on 29 Sep 2013 at 7:35

This fail to work with iPad touch interface

What steps will reproduce the problem?
1. Open sample with iPad  ( I try with iPad2 iOS5 safari browser )
2. Try to move or rotate stl 3d-object.-- I can't do operation with touch 
interface.
3. even can't do zoom operation.

What is the expected output? 
System need to read touch points and do needful operation ie. move/zoom

What do you see instead?
as I say in  topic 1and 2.

What version of the product are you using? 
JSC3D 0.7.2 compressed code  --- Letest download in feb 2012


On what operating system? 
IOS5 on iPad2


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 20 Feb 2012 at 3:45

Loading Multiple Materials and 3d Objects

I'm using jsc3d-full-0.9.8

I have multiple 3d objects I'm loading in a drop-down menu.
I want to have multiple Materials I can load.

How do I do this?

My goal is to create a product viewer that you can change the fabrics for each 
styled Pillow.

Original issue reported on code.google.com by [email protected] on 8 Jan 2013 at 11:19

Attachments:

Cursor detection

It is possible to detect a click or mouse over on the 3D object? I tried in 
many variants mouseover() and jquery hover(), with no results.

Original issue reported on code.google.com by [email protected] on 15 Jan 2013 at 2:40

ipad Safari/Chrome crash on loading STL > 3 MByte

What steps will reproduce the problem?
1. load the STL using (within a Sencha Touch Application, viewerXubComponent is 
a Sencha Container): 
...
viewerSubComponent.setHtml('<canvas id=\"stlCv\" style=\"border: 1px solid;\" 
width=\"890\" height=\"650\" ></canvas>');
    var canvas = Ext.get('stlCv');
    var viewer = new JSC3D.Viewer(canvas.dom);
    viewer.setParameter('ModelColor',       '#CAA618');
    viewer.setParameter('BackgroundColor1', '#E5D7BA');
    viewer.setParameter('BackgroundColor2', '#383840');
    viewer.setParameter('RenderMode',       'flat');
    viewer.setParameter('Renderer',       'webgl');
    viewer.setParameter('Definition',       'standard');
    viewer.init();
    viewer.update();
    var stl_loader = new JSC3D.StlLoader();
    stl_loader.onload = function(scene) {
        viewer.replaceScene(scene);
    };
    stl_loader.loadFromUrl(documentPath);
...


2. Files till around 3 MByte work well 
3.

What is the expected output? What do you see instead?
view of the STL

What version of the product are you using? On what operating system?
iOS 7.0.4, Safari(current with the version of iOS) and Chrome (Version 
31.0.1650.18)
jsc3d.js, jsc3d.touch.js and jsc3d.webgl.js download from today

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 4 Dec 2013 at 2:27

Attachments:

JSC3D - Examples

Hallo,

I don't know if this is the right place but I don't know where to place my 
problem: 

I just started with JSC3D and want to play a little bit with this tool. So I 
downloaded the JSC3D 0.7.2 compressed code and from this site 
(http://jsc3d.googlecode.com/svn/trunk/jsc3d/demos/tricera.html) the source 
code. I changed the obj by an other obj-file which I have on hard disc, so that 
something can be loaded. But when I start the program I it doesn't work. Canvas 
does not load. 
What do I do wrong? Did I forget something? Can I find somewhere a full example 
which I can just copy and paste and then it works?

Thanks in advance.

Original issue reported on code.google.com by [email protected] on 30 Jun 2012 at 9:34

solution to load obj files with labels

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
i want to display a object associated with labels

What version of the product are you using? On what operating system?


Please provide any additional information below.
unfortunately i got .obj format of a 3d model without labels which is actually 
designed in such a way that is associated with labels.is there any way to add 
labels to the 3d model.i have an option to export it in xml format.can the xml 
format support me to incorporate the data into canvas.i need guidance in this 
regard.thanks in advance.

Original issue reported on code.google.com by [email protected] on 11 Jul 2013 at 9:52

Cant display stl files in ie 9

What steps will reproduce the problem?
1. Load your stl demo file in ie 9 


What is the expected output? What do you see instead?
I see a blank square where the image should be

What version of the product are you using? On what operating system?
ie 9. Your demo works when you use the Flash version, but not the standard 
javascript version.

Please provide any additional information below.
I have tried it on 3 computers and neither  your demo or our files display. Any 
advise please?

Original issue reported on code.google.com by [email protected] on 19 Mar 2013 at 12:00

help regarding loading .md2 file

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
As i m new to javascript i need help upon loading different .md2 files on 
button click option.

What version of the product are you using? On what operating system?


Please provide any additional information below.
In ur md2viewer example u have got the canvas instance through model list.my 
requirement is to display a md2 file on button click.for example 
1)on clicking button1,1.md2 file should get loaded in the canvas.
2)on clicking button2,2.md2 file should get loaded in the canvas.
3)on clicking button3,3.md2 file should get loaded in the canvas.
and so on.
How can this be achieved.how can i code button onclick event.
kindly help me plz.
thanks in advance.

Original issue reported on code.google.com by [email protected] on 15 Jul 2013 at 4:17

What other interactions are available using jsc3d?

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 3 Apr 2013 at 8:32

Problem loading on page

Hi, this is less of a bug and more of an implementation problem.

I am trying to implement jsc3d in my website. I am relatively new to web and 
javascript - so the problem is probably easy to fix.

I was wondering if you could look at the page and help me?
http://daniel-creese.co.cc/Mobile/index.html

Daniel. 

Original issue reported on code.google.com by [email protected] on 3 Nov 2012 at 11:26

How to use StlLoader and loadFromUrl properly?

What steps will reproduce the problem?
1. I want to load .stl via STLLoader
2. Can't get it work.
3. There is no documentation or examples for this method online.

What is the expected output? What do you see instead?
I want to load .stl into viewer but it's not working.

What version of the product are you using? On what operating system?
JSC3D 0.9.8 full release / Windwos XP 64

Please provide any additional information below.
Could anybodu please write me a simple code that will load .stl into a 
viewer/scene using StlLoader? I just want to know how it works. I don't want to 
use setParameter method.

Original issue reported on code.google.com by [email protected] on 15 Jul 2013 at 5:09

Attachments:

Unable to load STL files locally and asynchronously

What steps will reproduce the problem?
 -Hi! I'm working on an application that involves previewing and uploading STL files. I've been using the HTML5 File api to read in the file and then send the data to stlLoader's parseStl function. However this only works if the files are small. Because it's asychronous, if the file is too large mesh = scene.getChildren() will fail. 

What is the expected output? What do you see instead?
Loading fails because the scene.children array is empty. 

What version of the product are you using? On what operating system?
1.4.2, on ubuntu. 

Please provide any additional information below.

I've been looking at the pattern shown here: 
https://code.google.com/p/jsc3d/issues/detail?id=36

However, it seems that the problem is that because I'm using parseStl on a 
local FileReader object, the onload function isn't being triggered. I tried 
adding a callback to the parseStl function like so:

var stl_loader = new JSC3D.StlLoader()
on_model_load = function(scene) {
    var mesh = scene.getChildren()
    theScene.addChild(mesh[0])
    viewer.init()
    viewer.replaceScene(theScene)
    viewer.update()
}
reader.onload = function(event) {
    var scene = new JSC3D.Scene
    stl_loader.parseStl(scene, event.target.result, on_model_load)
    var mesh = scene.getChildren()
}

JSC3D.StlLoader.prototype.parseStl = function(scene, data, callback) {
  .
  .
  .
   if(!mesh.isTrivial()) {
    if( Math.abs(mesh.faceNormalBuffer[0]) < 1e-6 &&
            Math.abs(mesh.faceNormalBuffer[1]) < 1e-6 &&
        Math.abs(mesh.faceNormalBuffer[2]) < 1e-6 ) {
        mesh.faceNormalBuffer = null;
        }
        scene.addChild(mesh);
        callback(scene) // my addition.
    }
}

This had no effect on the problem: small trigger the callback and load 
correctly, large files do not trigger the callback and don't load. 




Original issue reported on code.google.com by [email protected] on 1 Oct 2013 at 8:38

Asus EEEPC shows only the empty canvas

What steps will reproduce the problem?
1. Loading http://dhtx.de/it/ek/Projekt%203D-Drucker.html on a smaller device 
like Netbooks.
2.
3.

What is the expected output? What do you see instead?
On my Desktop PC i see my "3D Printer under Dev." very nicely rendered.
On my Netbook (Asus EEEPC) i see only the empty canvas.

Please provide any additional information below.
I've investigated with Firebug (see on bottom)but i can't find the exact 
reason. I think too much Data perhaps!?
Is it planned to work with zipped Data?
Please answer, i'm an enthusiastic user of your Script!

LG
Dieter Hardt

Antwort-Header
Accept-Ranges   bytes
Cache-Control   max-age=1209600
Connection  Keep-Alive
Content-Length  3285454
Content-Type    text/plain
Date    Wed, 03 Jul 2013 12:55:18 GMT
Etag    "a8cac002-3221ce-4e08da09c1859"
Expires Wed, 17 Jul 2013 12:55:18 GMT
Keep-Alive  timeout=2, max=200
Last-Modified   Tue, 02 Jul 2013 20:59:56 GMT
Server  Apache
Anfrage-HeaderQuelltext anzeigen
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Cache-Control   max-age=0
Connection  keep-alive
DNT 1
Host    dhtx.de
Origin  http://www.dhtx.de
Referer http://www.dhtx.de/it/ek/Projekt%203D-Drucker.html
User-Agent  Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0

Original issue reported on code.google.com by [email protected] on 3 Jul 2013 at 1:27

Problem viewing obj files?

What steps will reproduce the problem?
1. Download the zip package and extract files
2. Upload files to the server
3. Attempt to run the a demo for example:  bmw.html

What is the expected output? 

View a 3d version of a bmw

What do you see instead?

failed to load obj file "bmw/bmw.obj", the file exists but does not display?

What version of the product are you using? 

jsc3d-full-0.9.8.zip

On what operating system?

Windows 7 and on a webserver

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 5 Jul 2013 at 12:35

No transparency

I've been trying to export canvas renderings to png via data urls...
With no background colors / image there is still solid black.


What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

I've used this rather hackish solution where my background color is pure green 
and .... 

    case 'standard':
    default:
        for(var src=0, dest=0; src<csize; src++, dest+=4) {
            var color = cbuf[src];
            data[dest    ] = (color & 0xff0000) >> 16;
            data[dest + 1] = (color & 0xff00) >> 8;
            data[dest + 2] = color & 0xff;
            if (color != 0x00FF00){
                data[dest + 3] = 0xff;
            } else {
                data[dest + 3] = 0x00;
            }
        }
        break;
    }

Original issue reported on code.google.com by [email protected] on 3 Sep 2013 at 8:46

Very slow on Windows Safari and iPad

What steps will reproduce the problem?
1. Opening a sample in safari and moving the camera around

What is the expected output? What do you see instead?
Expected : something as smooth as Firefox / Opera / Chrome / Internet Explorer
Seen instead : very slow ! :(

What version of the product are you using? On what operating system?
Windows 7 64 bits, chrome 21.0.1180.75 and Safari 5.1.7

Please provide any additional information below.
Note: for iPad, i added the fix i tweaked explained in 
http://code.google.com/p/jsc3d/issues/detail?id=3


Thanks a lot for your help !

Original issue reported on code.google.com by [email protected] on 12 Aug 2012 at 8:56

color from .obj file

What steps will reproduce the problem?
1.
I  try to load a simple .obj file with simple color information
2.
3.

What is the expected output? What do you see instead?

i'd like to see a objetc with color. Instead i see no color in object

What version of the product are you using? On what operating system?
i use latest version with windows 7 in chrome o IE9

Please provide any additional information below.

I'd like to Know if there's the possibility to read color information by .obj 
file ( not Texture) or if is there a possibility to color an object with a 
uniform color in someway by a command.

Original issue reported on code.google.com by [email protected] on 6 Dec 2012 at 9:09

Attachments:

Canvas with transparent background.

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
 Will be nice to have the possiblity to render the objects on a transparent canvas so that the bakground of the page (or any other object under this canvas will be visible)

What version of the product are you using? On what operating system?


Please provide any additional information below.

I already implemented it and after I'll refine the solution i could attach a 
new version of the javascript file.


Original issue reported on code.google.com by [email protected] on 13 Jul 2013 at 6:46

unable to get object textures

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

i wanted to load my object file and get it in the canvas with texture. i was 
successful at loading my obj from hard disk but without any textures.
What version of the product are you using? On what operating system?
windows xp with latest version of jsc3d 


Please provide any additional information below.
is there any code to include or with work with textures.

i worked upon this by changing simply color codes but i need textures.is there 
anything like an image file to be inserted to get textures
viewer.setParameter('BackgroundColor1', '#FF8C00');
    viewer.setParameter('BackgroundColor2', '#FFFFFF');
    viewer.setParameter('RenderMode', 'texturesmooth');
    viewer.setParameter('MipMapping', 'on');
plz kindly help me out soon

Original issue reported on code.google.com by [email protected] on 3 Jul 2013 at 6:31

Not loading textures from mtl (and FIX!)

When modifying an mtl file in an editor (windows/notepad) possibly an \r 
character is inserted. The jsc3d/ObjLoader does not remove the '\r' and thus 
not load the textures.

Just use the replace function to remove the '/r': 

// GOTO 
JSC3D.ObjLoader.prototype.parseMtl = function(data) {
    var mtls = {};
    var curMtlName = '';


        data = data.replace(/(\r)/gm,"");   //<------ ADD THIS

Original issue reported on code.google.com by [email protected] on 17 Apr 2013 at 9:18

Not working correctly in IE10 with STL file

What steps will reproduce the problem?
1. IE10 W7Pro (VS2010 not required)
2. STL file
3. jsc3d 0.9.8

What is the expected output? What do you see instead?
STL file should be loaded but get
Java script error regarding "overrideMimeType" 
Works OK in Firefox etc

Please provide any additional information below.

Seems to give error on "overrideMimeType" 
in the following javascript function - error skipped if tested first but then 
no STL file loaded - error line is remarked out below

JSC3D.StlLoader.prototype.loadFromUrl = function(urlName) {
    var self = this;
    var xhr = new XMLHttpRequest;
    xhr.open('GET', urlName, true);

    if (!!xhr.overrideMimeType) xhr.overrideMimeType('text/plain; charset=x-user-defined');
    /*xhr.overrideMimeType('text/plain; charset=x-user-defined');
    */

Original issue reported on code.google.com by [email protected] on 21 May 2013 at 11:56

Stl files displaying wrong in ie- works fine in all other browsers (using latest code- stl would not load in old code)

What steps will reproduce the problem?
1. Go to http://www.ivarface.com/3dviewer.html
2. Click on load for any stl - it will not display the mesh correctly. Click on 
the obj file in the dropdown on the right. No progress bar will appear but it 
will load the mesh correctly eventually.
3. No problems on safari, chrome or firefox or on an ipad. All the meshes are 
binary stls and have been processed in both meshlab and netfabb.(no errors) All 
meshes have approx. 100000 - 150000 faces.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
Latest from repository on win 7 ie10 on two different computers.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Aug 2013 at 12:55

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.