Search:

Type: Posts; User: Phinehas

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    7,770

    Different drawArrays modes in WebGL

    I find there are several mode in drawArrays function. They are POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN.

    As I know (and I hope my understanding is correct):...
  2. Replies
    5
    Views
    3,426

    Re: Finding Angle between Vertices

    Yes.
  3. Replies
    5
    Views
    3,426

    Re: Finding Angle between Vertices

    Yes. It is very useful.

    Now, I still have one problem. I also need to implement one more thing. When I input the angle, the vertices will automatically change to form the new angle. Since I have...
  4. Replies
    5
    Views
    3,426

    Finding Angle between Vertices

    Hi,

    I want to find the angle between three vertices (they may have different x, y, z value). However, I don't know how to find it efficiently. Now, I only have the idea to find the length of three...
  5. Replies
    4
    Views
    2,708

    Re: Showing axis in WebGL

    I have tried different orders to enable the lighting effect. And I find one thing:
    It cannot draw the line in the scene. But other objects such as color model and texture can be showed correctly.
    ...
  6. Replies
    4
    Views
    2,708

    Re: Showing axis in WebGL

    Yes, so I try to draw the axis. However, I encounter some problems and I think it is becasue of the mistake in shader script.

    I use 2 shader scripts to generate the model (one for color and one...
  7. Replies
    4
    Views
    2,708

    Showing axis in WebGL

    Hi,

    I want to show the input box and allow users to input the rotation value and translation value to update the model. However, I think users does not know where is X, Y, Z axis. Is it possible...
  8. Replies
    1
    Views
    2,097

    Drawing WebGL back to 2D Canvas

    Hi,

    I can draw some textures (use 2D canvas) in WebGL. However, I encounter another problem. If I want to rotate the object in WebGL and then draw the current view (after rotation) in 2D...
  9. Replies
    2
    Views
    2,133

    Re: Drawing Line Problem

    I find out the problem but I still am not able to solve it and want to find help from here.

    The mistake happens when I use the following shader:

    <script id="shader-fs"...
  10. Replies
    2
    Views
    2,133

    Re: Drawing Line Problem

    Hi,

    More information, I also cannot draw the triangle using the fourth and fifth vertices.

    For example:

    geometryVertexIndices = geometryVertexIndices.concat([0, 1, 4]);
    ...
  11. Replies
    2
    Views
    2,133

    Drawing Line Problem

    Hi,

    I have a problem in drawing line.


    vertices = vertices.concat([0, 0, 0]);
    vertices = vertices.concat([0, 0, 2]);
    vertices = vertices.concat([2, 0, 0]);
    vertices =...
  12. Re: Drawing Line in color and Mapping Texture in the same sc

    Yes, I duplicated the original sharder and shader-fs, shader-vs. Also, I have initialized two sharders. However, firefox show me the following message:
    UniformMatrix4fv: location: this uniform...
  13. Thread: Line Width

    by Phinehas
    Replies
    1
    Views
    3,696

    Line Width

    Hi,

    I find a function called "lineWidth". However, I cannot set the line width using this function. Since I think the drawn line is thin, I want to make it thick. Is there any method to make...
  14. Thread: Text in WebGL

    by Phinehas
    Replies
    9
    Views
    8,183

    Re: Text in WebGL

    Now, I'm using this method to show the text. However, I encounter the difficulties on mapping the texture and drawing line in color in the same scene. I don't know how to set "gl_FragColor" to...
  15. Drawing Line in color and Mapping Texture in the same scene

    Hi,

    I encounter some difficulties on drawing in color and mapping texture. If I only draw line in different color or map texture to the rectangle, it is ok. However, when I combine these two...
  16. Thread: Text in WebGL

    by Phinehas
    Replies
    9
    Views
    8,183

    Re: Text in WebGL

    Hi SteveBaker,

    I'm doing a project (Web Application) drawing some mathematical diagrams using WebGL. I want to draw the length of the line next to the line and the angle between two...
  17. Could not initialise shaders when adding texture

    Hi All,

    I want to map a texture to the sphere. However, I encounter a problem. The program only prompts "Could not initialise shaders".

    Is there any mistake I made in the program? Can anyone...
  18. Replies
    1
    Views
    1,796

    Mouse button clicked checking

    Hi,

    Can WebGL detect the clicked mouse button (left, middle, and right), since I want to do some rotation and zoom in/out and would like to implement them with mouse buttons event?
  19. Replies
    2
    Views
    2,750

    Rotation to form a pyramid

    Hi,

    I have an idea and want to implement it in WebGL. Normally, we have to create many vertex to form a pyramid (at least four triangle and three vertex for each triangle).

    However, I...
  20. Thread: Text in WebGL

    by Phinehas
    Replies
    9
    Views
    8,183

    Text in WebGL

    Hi.

    I'm trying to model a simple cube and want to add some information (such as the x,y coordinates) into the cube. Is there any methods to do it?
  21. Replies
    0
    Views
    2,206

    Library for WebGL development?

    Hi All,

    I'm a beginner of the WebGL. I would like to build some simple 3D models like cube, cone and pyramids in asp.net and c#.net. However, I'm thinking about the library. Is there any...
Results 1 to 21 of 23