• SEARCH

    통합검색
세모계
    • Dark Mode
    • GNB Always Open
    • GNB Height Maximize
    • Color
    • Brightness
    • SINCE 2015.01.19.
    • 세모계 세모계
    •   SEARCH
    • 세상의 모든 계산기
      • 자유(질문) 게시판
      • 계산기 뉴스/정보
      • 수학, 과학, 공학 이야기
      • 세모계 : 공지 게시판
        • 구글 맞춤검색
    • TI
    • CASIO
    • HP
    • SHARP
    • 일반(쌀집) 계산기
    • 기타계산기
    • by OrangeDay
  • 세상의 모든 계산기 자유(질문) 게시판
    • 세상의 모든 계산기 자유(질문) 게시판 일반 ()
    • 불티 움직임 시뮬레이션 (html5)

    • Profile
      • 세상의모든계산기
      • 2025.01.18 - 09:07 2025.01.18 - 08:54 4931

    1
    1
    1
    1

     

    image.png

    <!DOCTYPE html>
    <html>
    <head>
        <style>
            body {
                background: #1a1a1a;
                color: #fff;
                font-family: Arial, sans-serif;
                margin: 0;
                padding: 20px;
                display: flex;
                flex-direction: column;
                align-items: center;
            }
            canvas {
                background: #1a1a1a;
                border: 1px solid #333;
                margin: 20px 0;
            }
            .controls {
                background: rgba(0, 0, 0, 0.7);
                padding: 20px;
                border-radius: 10px;
                width: 380px;
            }
            .control-group {
                margin: 15px 0;
            }
            .control-group label {
                display: block;
                margin-bottom: 5px;
                color: #ffa500;
            }
            .slider-container {
                display: flex;
                align-items: center;
                gap: 10px;
            }
            input[type="range"] {
                flex: 1;
                height: 10px;
                -webkit-appearance: none;
                background: #333;
                border-radius: 5px;
                outline: none;
            }
            input[type="range"]::-webkit-slider-thumb {
                -webkit-appearance: none;
                width: 20px;
                height: 20px;
                background: #ffa500;
                border-radius: 50%;
                cursor: pointer;
            }
            .value-display {
                min-width: 50px;
                text-align: center;
                background: #333;
                padding: 5px;
                border-radius: 3px;
            }
        </style>
    </head>
    <body>
        <canvas id="sparkCanvas"></canvas>
        <div class="controls">
            <div class="control-group">
                <label>크기 배율 (Size Scale)</label>
                <div class="slider-container">
                    <input type="range" id="sizeScale" min="0.5" max="3" step="0.1" value="1">
                    <span class="value-display" id="sizeValue">1</span>
                </div>
            </div>
            <div class="control-group">
                <label>온도 배율 (Temperature Scale)</label>
                <div class="slider-container">
                    <input type="range" id="tempScale" min="0.5" max="2" step="0.1" value="1">
                    <span class="value-display" id="tempValue">1</span>
                </div>
            </div>
            <div class="control-group">
                <label>무게 배율 (Weight Scale)</label>
                <div class="slider-container">
                    <input type="range" id="weightScale" min="0.5" max="2" step="0.1" value="1">
                    <span class="value-display" id="weightValue">1</span>
                </div>
            </div>
            <div class="control-group">
                <label>수명 배율 (Life Scale)</label>
                <div class="slider-container">
                    <input type="range" id="lifeScale" min="0.5" max="2" step="0.1" value="1">
                    <span class="value-display" id="lifeValue">1</span>
                </div>
            </div>
        </div>
        <script>
            const canvas = document.getElementById('sparkCanvas');
            const ctx = canvas.getContext('2d');
    
            // 캔버스 크기 설정
            canvas.width = 400;
            canvas.height = 600;
    
            // 컨트롤 요소
            const controls = {
                sizeScale: document.getElementById('sizeScale'),
                tempScale: document.getElementById('tempScale'),
                weightScale: document.getElementById('weightScale'),
                lifeScale: document.getElementById('lifeScale')
            };
    
            // 값 표시 요소
            const displays = {
                sizeValue: document.getElementById('sizeValue'),
                tempValue: document.getElementById('tempValue'),
                weightValue: document.getElementById('weightValue'),
                lifeValue: document.getElementById('lifeValue')
            };
    
            // 컨트롤 값 업데이트 함수
            Object.keys(controls).forEach(key => {
                controls[key].addEventListener('input', (e) => {
                    displays[key.replace('Scale', 'Value')].textContent = e.target.value;
                });
            });
    
            class Spark {
                constructor() {
                    this.reset();
                }
    
                reset() {
                    this.x = canvas.width/2 + (Math.random() * 40 - 20);
                    this.y = canvas.height - 20;
                    
                    // 슬라이더 값을 반영한 특성 설정
                    this.baseSize = Math.random() * 3 + 1;
                    this.size = this.baseSize * parseFloat(controls.sizeScale.value);
                    
                    this.baseTemp = Math.random() * 0.5 + 0.5;
                    this.temperature = this.baseTemp * parseFloat(controls.tempScale.value);
                    
                    this.baseWeight = Math.random() * 0.3 + 0.1;
                    this.weight = this.baseWeight * parseFloat(controls.weightScale.value);
                    
                    this.vx = 0;
                    this.vy = -2 - (this.temperature * 2);
                    
                    this.baseLife = 1.0;
                    this.life = this.baseLife * parseFloat(controls.lifeScale.value);
                    
                    this.color = `rgba(255, ${150 + Math.random() * 105}, 0, ${this.life})`;
                }
    
                update() {
                    // 현재 슬라이더 값으로 특성 업데이트
                    this.size = this.baseSize * parseFloat(controls.sizeScale.value);
                    this.temperature = this.baseTemp * parseFloat(controls.tempScale.value);
                    this.weight = this.baseWeight * parseFloat(controls.weightScale.value);
                    
                    this.vx += Math.sin(Date.now() * 0.001) * 0.1 * this.weight;
                    this.x += this.vx;
                    this.y += this.vy * this.temperature;
                    
                    this.life -= 0.005 / parseFloat(controls.lifeScale.value);
                    this.size *= 0.999;
                    
                    if (this.life <= 0 || this.y < 0 || this.x < 0 || this.x > canvas.width) {
                        this.reset();
                    }
                    
                    this.color = `rgba(255, ${150 + Math.random() * 105}, 0, ${this.life})`;
                }
    
                draw() {
                    ctx.beginPath();
                    ctx.fillStyle = this.color;
                    ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
                    ctx.fill();
                }
            }
    
            const sparks = Array(50).fill().map(() => new Spark());
    
            function animate() {
                ctx.fillStyle = 'rgba(26, 26, 26, 0.2)';
                ctx.fillRect(0, 0, canvas.width, canvas.height);
    
                sparks.forEach(spark => {
                    spark.update();
                    spark.draw();
                });
    
                requestAnimationFrame(animate);
            }
    
            animate();
        </script>
    </body>
    </html>


     

    Attached file
    image.png 10.6KB 46
    이 게시물을..
    N
    0
    0
    • 세상의모든계산기 25
      세상의모든계산기

      계산기는 거들 뿐
      혹은
      계산기를 거들 뿐

    세상의모든계산기 님의 최근 글

    ban 설정 강화 14617 1 2026 05.09 정적분 구간에 미지수가 있고, solve 를 사용할 수 없을 때 그 값을 확인하려면? 2243 4 2026 04.10 높아질수록 좁아지는 시야에 대하여 - written by ChatGPT 9477 2026 02.12 내가 올해 몇살이더라? (내 나이 계산기) 7943 2026 02.11 AGI 자기 거버넌스 구조와 인간-AGI 관계 모델 (written by GEMINI & GPT) 9746 1 2026 01.30

    세상의모든계산기 님의 최근 댓글

    링크가 깨졌다고 하시니   404 에러가 나는 아래 링크를 말씀하시는 것 같은데  https://digilander.libero.it/fpirozzi/fourier.zip 이것은 TI-89 / TI-92 용 파일이며    [TI-92][TI-89] Fourier Transform Library https://allcalc.org/52455 링크의 Attatched files + 안에 있습니다.  2026 09.11 본문에 사용된 nspire 용 파일은 본문 하단에 Attatched files + 안에 있습니다.  클릭하면 표시됩니다.    2026 09.11 이 사이트에 올라와 있는 첨부 파일은 본문 하단에 있는 [Attatchment] 버튼을 눌러야 리스트가 보입니다. 2026 09.07 이렇게 질문하시면 무슨 파일인지 알 수가 없습니다.   해당 글에 댓글을 쓰시는게 최선이며,    권한 문제로 그것이 불가능하면  해당 글의 주소를 붙여넣으시거나,  제목 전체를 복사해 넣으셔야 구분이 됩니다. 2026 09.07 - claude AI는 l-c*r^2 을 1-c*r^2 으로 잘못 읽고 표시하고 있습니다. - TI-nspire CAS 계산기에 l-c*r^2 ≥0 을 조건에 추가해 계산해 보아도 결과는 바뀌지 않습니다. 2026 07.20
    글쓴이의 서명작성글 감추기 
    • 댓글 입력
    • 에디터 전환
    댓글 쓰기 에디터 사용하기 닫기
    • view_headline 목록
    • 14px
    • 목록
      view_headline
    × CLOSE
    전체 일반 389 질문 509 웃김 2 팁 & 정보 16 퀴즈 2 리뷰 11 퍼옴 & 링크 6 공지 1
    기본 (0) 제목 날짜 수정 조회 댓글 추천 비추
    분류 정렬 검색
    등록된 글이 없습니다.
    • 글쓰기
    • 세상의 모든 계산기 자유(질문) 게시판
    • 세상의모든계산기
    • 사업자등록번호 703-91-02181
    • 세모계 all rights reserved.