<commit_before><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">  <!-- Use Chrome Frame in IE -->
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="Construct and style polylines.">
    <title>Cesium Demo</title>
    <script type="text/javascript" src="../Sandcastle-header.js"></script>
    <script type="text/javascript">
    var dojoConfig = {
        baseUrl : '../../../Source',
        packages: [
            { name: 'dojo', location: '../ThirdParty/dojo-release-1.8.3-src/dojo' },
            { name: 'dijit', location: '../ThirdParty/dojo-release-1.8.3-src/dijit' },
            { name: 'dojox', location: '../ThirdParty/dojo-release-1.8.3-src/dojox' }
        ]
    };
    </script>
    <script data-dojo-config="async: 1, tlmSiblingOfDojo: 0" src="../../../ThirdParty/dojo-release-1.8.3-src/dojo/dojo.js"></script>
    <link rel="stylesheet" href="../../../ThirdParty/dojo-release-1.8.3-src/dijit/themes/claro/claro.css" type="text/css">
    <link rel="stylesheet" href="../../../Source/Widgets/Dojo/CesiumViewerWidget.css" type="text/css">
</head>
<body class="claro sandcastle-loading" data-sandcastle-bucket="bucket-dojo.html" data-sandcastle-title="Cesium + Dojo">
<style>
    @import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
require([
    'Cesium', 'Widgets/Dojo/CesiumViewerWidget'
], function(
    Cesium, CesiumViewerWidget)
{
    "use strict";

    function createPrimitives(widget) {
        var ellipsoid = widget.ellipsoid;
        var primitives = widget.scene.getPrimitives();
        var polylines = new Cesium.PolylineCollection();

        // A simple polyline with two points.
        var polyline = polylines.add();
        Sandcastle.declare(polyline);   // For highlighting on mouseover in Sandcastle.
        polyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-120.0, 40.0),
            Cesium.Cartographic.fromDegrees(-110.0, 30.0)
        ]));

        // Set a polyline's color
        var coloredPolyline = polylines.add();
        Sandcastle.declare(coloredPolyline);    // For highlighting on mouseover in Sandcastle.
        coloredPolyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-95.0, 30.0),
            Cesium.Cartographic.fromDegrees(-85.0, 40.0)
        ]));
        coloredPolyline.setDefaultColor({
            red   : 1.0,
            green : 1.0,
            blue  : 0.0,
            alpha : 0.75
        });

        // Set a polyline's width
        var widePolyline = polylines.add();
        Sandcastle.declare(widePolyline);   // For highlighting on mouseover in Sandcastle.
        widePolyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-105.0, 40.0),
            Cesium.Cartographic.fromDegrees(-100.0, 38.0),
            Cesium.Cartographic.fromDegrees(-105.0, 35.0),
            Cesium.Cartographic.fromDegrees(-100.0, 32.0)
        ]));
        widePolyline.setWidth(5);
        widePolyline.setDefaultOutlineColor({
            red : 1.0,
            green : 0.0,
            blue : 0.0,
            alpha : 1.0
        });

        primitives.add(polylines);

        // Draw a line in a local reference frame
        // The arrow points to the east, i.e. along the local x-axis.
        var localPolylines = new Cesium.PolylineCollection();
        var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-80.0, 35.0));
        localPolylines.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
        var localPolyline = localPolylines.add();<commit_msg>Add a per-vertex color polyline example to the Sandcastle.<commit_after><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">  <!-- Use Chrome Frame in IE -->
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="Construct and style polylines.">
    <title>Cesium Demo</title>
    <script type="text/javascript" src="../Sandcastle-header.js"></script>
    <script type="text/javascript">
    var dojoConfig = {
        baseUrl : '../../../Source',
        packages: [
            { name: 'dojo', location: '../ThirdParty/dojo-release-1.8.3-src/dojo' },
            { name: 'dijit', location: '../ThirdParty/dojo-release-1.8.3-src/dijit' },
            { name: 'dojox', location: '../ThirdParty/dojo-release-1.8.3-src/dojox' }
        ]
    };
    </script>
    <script data-dojo-config="async: 1, tlmSiblingOfDojo: 0" src="../../../ThirdParty/dojo-release-1.8.3-src/dojo/dojo.js"></script>
    <link rel="stylesheet" href="../../../ThirdParty/dojo-release-1.8.3-src/dijit/themes/claro/claro.css" type="text/css">
    <link rel="stylesheet" href="../../../Source/Widgets/Dojo/CesiumViewerWidget.css" type="text/css">
</head>
<body class="claro sandcastle-loading" data-sandcastle-bucket="bucket-dojo.html" data-sandcastle-title="Cesium + Dojo">
<style>
    @import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
require([
    'Cesium', 'Widgets/Dojo/CesiumViewerWidget'
], function(
    Cesium, CesiumViewerWidget)
{
    "use strict";

    function createPrimitives(widget) {
        var ellipsoid = widget.ellipsoid;
        var primitives = widget.scene.getPrimitives();
        var polylines = new Cesium.PolylineCollection();

        // A simple polyline with two points.
        var polyline = polylines.add();
        Sandcastle.declare(polyline);   // For highlighting on mouseover in Sandcastle.
        polyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-120.0, 40.0),
            Cesium.Cartographic.fromDegrees(-110.0, 30.0)
        ]));

        // Set a polyline's color
        var coloredPolyline = polylines.add();
        Sandcastle.declare(coloredPolyline);    // For highlighting on mouseover in Sandcastle.
        coloredPolyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-95.0, 30.0),
            Cesium.Cartographic.fromDegrees(-85.0, 40.0)
        ]));
        coloredPolyline.setDefaultColor({
            red   : 1.0,
            green : 1.0,
            blue  : 0.0,
            alpha : 0.75
        });
        
        // set a polyline's color per position
        var perPositionColoredPolyline = polylines.add();
        Sandcastle.declare(perPositionColoredPolyline); // For highlighting on mouseover in Sandcastle.
        perPositionColoredPolyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-115.0, 45.0),
            Cesium.Cartographic.fromDegrees(-95.0, 45.0)
        ]));
        perPositionColoredPolyline.setColors([
            {
                red : 0.0,
                green : 1.0,
                blue : 0.0,
                alpha : 0.5,
            }, {
                red : 1.0,
                green : 0.0,
                blue : 0.0,
                alpha : 1.0
            }
        ]);

        // Set a polyline's width
        var widePolyline = polylines.add();
        Sandcastle.declare(widePolyline);   // For highlighting on mouseover in Sandcastle.
        widePolyline.setPositions(ellipsoid.cartographicArrayToCartesianArray([
            Cesium.Cartographic.fromDegrees(-105.0, 40.0),
            Cesium.Cartographic.fromDegrees(-100.0, 38.0),
            Cesium.Cartographic.fromDegrees(-105.0, 35.0),
            Cesium.Cartographic.fromDegrees(-100.0, 32.0)
        ]));
        widePolyline.setWidth(5);
        widePolyline.setDefaultOutlineColor({
            red : 1.0,
            green : 0.0,
            blue : 0.0,
            alpha : 1.0
        });

        primitives.add(polylines);

        // Draw a line in a local reference frame
        // The arrow points to the east, i.e. along the local x-axis.
        var localPolylines = new Cesium.PolylineCollection();
        var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-80.0, 35.0));
        localPolylines.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
        var localPolyline = localPolylines.add();
{'fraction_non_alphanumeric': 0.14598622558428362, 'fraction_numerical': 0.026306875917353506, 'mean_word_length': 2.4832874557609124, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6597799', 'n_tokens_mistral': 2980, 'n_tokens_neox': 2751, 'n_words': 491}